<?php
if (!defined('SMF'))
	die('Hacking attempt...');

global $smcFunc, $txt, $scripturl, $settings, $user_info;
global $dbtables, $ksm_allowed ;

// Verify user login, if CheckLogin() returns false return to the calling script/function
if (CheckLogin() == false)
	return;

//-------------------------------------------------------------------------------------------------

// Pull player info into $playerinfo.
$result = $smcFunc['db_query']('', '
	SELECT *
	FROM {raw:db_ships}
	WHERE user_id = {int:user_id}
	LIMIT 1',
	array(
		'db_ships' => $dbtables['ships'],
		'user_id' => $user_info['id'],
	)
);
$playerinfo = $smcFunc['db_fetch_assoc']($result);
$smcFunc['db_free_result']($result);

echo '
					<div id="bnt_main_menu">
						<ul class="rounded">
							<li class="bnt_menuheader">', $txt['bnt_main_menu'], '</li>
							<li>
								<a class="bnt_accmenu" href="#">', $txt['bnt_devices'], '</a>
								<div id="bnt_submenu">
									<div id="accmenu_ship_devices" class="bnt_submenu_item" title="sa=device">', $txt['bnt_device_list'], '</div>
									<div id="accmenu_ship_beacons" class="bnt_submenu_item" title="sa=beacon">', $txt['bnt_beacons'], '</div>
									<div id="accmenu_ship_warpedit" class="bnt_submenu_item" title="sa=warpedit">', $txt['bnt_warpedit'], '</div>
									<div id="accmenu_ship_genesis" class="bnt_submenu_item" title="sa=genesis">', $txt['bnt_genesis'], '</div>
									<div id="accmenu_ship_mines" class="bnt_submenu_item" title="sa=mines;op=1">', $txt['bnt_mines'], '</div>
									<div id="accmenu_ship_fighters" class="bnt_submenu_item" title="sa=mines;op=2">', $txt['bnt_fighters'], '</div>
									<div id="accmenu_ship_ewd" class="bnt_submenu_item" title="sa=emerwarp">', $txt['bnt_ewdabbr'], '</div>
								</div>
							</li>
							<li><a id="menu_defence_report" href="#" title="sa=defence_report">', $txt['bnt_sector_def'], '</a></li>
							<li>
								<a class="bnt_accmenu" href="#">', $txt['bnt_planets'], '</a>
								<div id="bnt_submenu">
									<div id="accmenu_planets_resources" class="bnt_submenu_item" title="sa=planet_report">', $txt['bnt_pr_menu_resources'], '</div>
									<div id="accmenu_planets_defences" class="bnt_submenu_item" title="sa=planet_report;PRepType=4">', $txt['bnt_pr_menu_defences'], '</div>
									<div id="accmenu_planets_change" class="bnt_submenu_item" title="sa=planet_report;PRepType=2">', $txt['bnt_pr_change'], '</div>';
if ($playerinfo['team'] > 0)
{
	echo '
									<div id="accmenu_planets_team" class="bnt_submenu_item" title="sa=team_planets">', $txt['bnt_pr_teamlink'], '</div>';
}

echo '
								</div>
							</li>
							<li>
								<a class="bnt_accmenu" href="#">', $txt['bnt_trade_control'], '</a>
								<div id="bnt_submenu">
									<div id="tr_view" class="bnt_submenu_item">', $txt['bnt_tdr_menuview'], '</div>
									<div id="tr_new" class="bnt_submenu_item">', $txt['bnt_tdr_menunew'], '</div>
									<div id="tr_settings" class="bnt_submenu_item">', $txt['bnt_tdr_menusettings'], '</div>
								</div>
							</li>							
							<li><a id="menu_ship_log" href="#" title="sa=log">', $txt['bnt_log'], '</a></li>
							<li><a id="menu_read_messages" href="#" title="sa=readmail">', $txt['bnt_read_msg'], '</a></li>
							<li><a id="menu_send_messages" href="#" title="sa=mailto2">', $txt['bnt_send_msg'], '</a></li>
							<li><a id="menu_teams" href="#" title="sa=teams">', $txt['bnt_teams'], '</a></li>
							<li><a id="menu_settings" href="#" title="sa=settings">', $txt['bnt_settings'], '</a></li>
							<li><a id="menu_options" href="#" title="sa=options">', $txt['bnt_options'], '</a></li>
							<li><a id="menu_navcomp" href="#" title="sa=navcomp">', $txt['bnt_navcomp'], '</a></li>';
if ($ksm_allowed == true)
{
	echo '										
							<li><a href="', $scripturl, '?action=blacknova;sa=galaxy">', $txt['bnt_map'], '</a></li>';
}

echo '				
							<li><a id="menu_self_destruct" href="#" title="sa=self_destruct">', $txt['bnt_ohno'], '</a></li>
							<li><a id="menu_ranking" href="#" title="sa=ranking">', $txt['bnt_rankings'], '</a></li>
							<li><a id="menu_help" href="#" title="sa=help">', $txt['bnt_help'], '</a></li>
							<li><a id="menu_faq" href="#" title="sa=faq">', $txt['bnt_faq'], '</a></li>				
						</ul>
					</div>
					<script>
						$(\'.rounded\').corners("top-left bottom-left transparent no-native");
					</script>
					<div id="bnt_footer">';
							
include($boarddir . '/bnt/footer.php');	

echo '		
					</div>';
?>